<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>自定义-登录页面</title>
</head>
<body>
<form action="/login" method="post">
    <div style="margin-top: 100px;text-align: center;">
        <h1>登录页面</h1>
        姓名：<input type="text" name="username"><br><br>
        密码：<input type="password" name="password"><br><br>
        <input type="submit" value=" 提 交 ">
        <div id="msgDiv" style="color: red;margin-top: 20px;display: none;">
            <b>错误：用户名或密码错误，请重试！</b>
        </div>
    </div>
</form>
<script type="application/javascript">
    var urlparam = window.location.search;
    if (urlparam.indexOf("error") > 0) {
        // 显示错误信息
        document.getElementById("msgDiv").style.display = 'block';
    }
</script>
</body>
</html>